<template>
  <!-- 放置一个图标 -->
  <div>
    <!-- 放置一个svg的图标 -->
    <svg-icon icon-class="fullscreen" style="color:#fff; width: 20px; height: 20px" @click="changeScreen" />
  </div>
</template>

<script>
import screenfull from 'screenfull'
export default {
  data() {
    return {

    }
  },

  created() {

  },

  methods: {
    changeScreen() {
      if (!screenfull.enabled) {
        this.$message({
          message: 'you browser can not work',
          type: 'warning'
        })
        return false
      }
      screenfull.toggle()
      // document.documentElement.webkitRequestFullScreen()
    }
  }
}
</script>

<style scoped lang='less'>

</style>
